#! /usr/bin/env python
import os, sys, cgi, re, time, shutil, traceback, getopt, locale
import tarfile
import subprocess

try:
    dir = "/home/arkub/data/"
    files = os.listdir(dir)
    for file in files:
        filepath = os.path.join(dir, file)
        print filepath
        cmd="scp "+compressed_file+" doc4@webrpms:~/data/"
        proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
        proc.wait()
            
    sys.exit(0)
except Exception,e:
        traceback.print_exc(file=sys.stdout)
        sys.exit(1)
                
